:root {
  /* 主题色彩 - 优化色彩方案 */
  --color-primary: #3B82F6;
  --color-primary-light: #60A5FA;
  --color-primary-dark: #2563EB;
  --color-secondary: #6B7280;
  --color-accent: #EC4899;
  --color-background: #FFFFFF;
  --color-surface: #F9FAFB;

  /* 扩展色彩 */
  --color-info: #3B82F6;
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-dark: #111827;

  /* 中性色系 */
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;

  /* 字体系统 */
  --font-family-sans: "Inter", "SF Pro Display", "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-mono: "JetBrains Mono", "Fira Code", monospace;
  --font-family-zh: "PingFang SC", "Noto Sans SC", sans-serif;
  --font-family-kai: "KaiTi", "STKaiti", "SimKai", "Noto Serif SC", serif;

  /* 字体大小与行高 */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* 间距系统 */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;

  /* 圆角 */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

  /* 过渡 */
  --transition-fast: 150ms;
  --transition-normal: 250ms;
  --transition-slow: 350ms;
  --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z轴顺序 */
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  --z-auto: auto;
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #111827;
    --color-surface: #1F2937;
    --color-primary: #60A5FA;
    --color-primary-light: #93C5FD;
    --color-primary-dark: #3B82F6;
    
    --color-gray-50: #374151;
    --color-gray-100: #1F2937;
    --color-gray-200: #374151;
    --color-gray-300: #4B5563;
    --color-gray-400: #6B7280;
    --color-gray-500: #9CA3AF;
    --color-gray-600: #D1D5DB;
    --color-gray-700: #E5E7EB;
    --color-gray-800: #F3F4F6;
    --color-gray-900: #F9FAFB;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.14);
  }
}

/* 基础样式 */
body {
  font-family: var(--font-family-sans), var(--font-family-zh);
  background-color: var(--color-surface);
  color: var(--color-gray-900);
  line-height: var(--line-height-normal);
  transition: background-color var(--transition-normal) var(--transition-timing),
              color var(--transition-normal) var(--transition-timing);
}

/* 现代组件样式 */
.modern-card {
  background: var(--color-background);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all var(--transition-normal) var(--transition-timing);
  border: 1px solid var(--color-gray-100);
  backdrop-filter: blur(10px);
}

.modern-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-gray-200);
}

.modern-btn {
  border-radius: var(--radius-lg);
  padding: var(--spacing-3) var(--spacing-6);
  font-weight: 500;
  transition: all var(--transition-normal) var(--transition-bounce);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  position: relative;
  overflow: hidden;
}

.modern-btn:after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
  top: -150%;
  left: -150%;
  opacity: 0;
  transition: all var(--transition-normal) var(--transition-timing);
}

.modern-btn:active:after {
  opacity: 0.3;
  top: -50%;
  left: -50%;
}

.modern-btn-primary {
  background: var(--color-primary);
  color: white;
}

.modern-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modern-btn-primary:active {
  transform: translateY(0);
}

.modern-input {
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: var(--spacing-3) var(--spacing-4);
  transition: all var(--transition-fast) var(--transition-timing);
  background-color: var(--color-background);
  color: var(--color-gray-900);
}

.modern-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  outline: none;
}

/* 动画 */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fade-in var(--transition-normal) var(--transition-timing) forwards;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.float {
  animation: float 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.shimmer {
  background: linear-gradient(90deg, 
    var(--color-gray-100), 
    var(--color-gray-50), 
    var(--color-gray-100));
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* 容器 */
.modern-container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-4);
  padding-right: var(--spacing-4);
}

@media (min-width: 640px) {
  .modern-container { max-width: 640px; }
}
@media (min-width: 768px) {
  .modern-container { max-width: 768px; }
}
@media (min-width: 1024px) {
  .modern-container { max-width: 1024px; }
}
@media (min-width: 1280px) {
  .modern-container { max-width: 1280px; }
} 